-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: don't use "interface" as a variable name #4900
Conversation
Note that some modules obviously copy-pasted it from there. For example:
|
In readline.markdown, don't use strict mode reserved keyword "interface" as a variable name. This commit changes the name of one `readline.Interface` instance from "interface" to "rl", as it is named in other places of the doc.
261d0a9
to
c4d3e91
Compare
I see no problems with that. Not all modules are stict-mode compatible |
@vkurchatkin But they would be forced to take some extra steps when migrating their sources to strict mode. Also, this means that people copy-paste that, and the users of strict mode already took some extra steps after copy-pasting the example code. |
@ChALkeR I mean, changing this in the docs is a good idea, but it's not a big deal that some modules have this. Some people deliberately write incompatible code |
LGTM |
LGTM |
1 similar comment
LGTM |
Thanks! Landed in 6894c62. |
In readline.markdown, don't use strict mode reserved keyword "interface" as a variable name. This commit changes the name of one `readline.Interface` instance from "interface" to "rl", as it is named in other places of the doc. PR-URL: #4900 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
In readline.markdown, don't use strict mode reserved keyword "interface" as a variable name. This commit changes the name of one `readline.Interface` instance from "interface" to "rl", as it is named in other places of the doc. PR-URL: #4900 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
In readline.markdown, don't use strict mode reserved keyword "interface" as a variable name. This commit changes the name of one `readline.Interface` instance from "interface" to "rl", as it is named in other places of the doc. PR-URL: #4900 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
In readline.markdown, don't use strict mode reserved keyword "interface" as a variable name. This commit changes the name of one `readline.Interface` instance from "interface" to "rl", as it is named in other places of the doc. PR-URL: #4900 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
In readline.markdown, don't use strict mode reserved keyword "interface" as a variable name. This commit changes the name of one `readline.Interface` instance from "interface" to "rl", as it is named in other places of the doc. PR-URL: #4900 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
In readline.markdown, don't use strict mode reserved keyword "interface" as a variable name. This commit changes the name of one `readline.Interface` instance from "interface" to "rl", as it is named in other places of the doc. PR-URL: nodejs#4900 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
In
readline.markdown
, don't use strict mode reserved keywordinterface
as a variable name.This commit changes the name of one
readline.Interface
instance frominterface
torl
, as it is named in other places of the readline documentation.